package com.yjt.common.hibernate.base;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Hashtable;
import java.util.Map;
import java.util.Vector;

import org.hibernate.criterion.MatchMode;


public interface AbstractDao {
	
	@SuppressWarnings("rawtypes")
	public Collection getBeansByBean(Serializable bean, MatchMode mode) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public Collection getBeansByParams(String hqlName, ArrayList paraList) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public Object [] getObjectsByParams(String hqlName, ArrayList paraList) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public Object getObjectByParams(String hqlName, ArrayList paraList) throws DaoException;
	
	public void makePersistent(Serializable bean, boolean flag) throws DaoException;
	
	public void makeTransient(Serializable bean)throws DaoException;
	
	public void updateBean(Serializable bean) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void deleteOrUpdateByParams(String hqlName, ArrayList paraList)throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void batchInsert(Collection beans) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void batchUpdate(Collection beans) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void batchDelete(Collection beans) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void batchUpdateOrInsert(Collection beans) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public int executeUpdateHql(String hqlName,ArrayList paraList) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public int executeUpdateHql(String hqlName,Hashtable table) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public void enableFilter(String filterName,Hashtable table) throws DaoException;
	
	public void disableFilter(String filterName) throws DaoException;
	
	@SuppressWarnings("rawtypes")
	public ArrayList getOrderArrayList();
	
	public void setHbmFlushSize(int hbmFlushSize);
	
	public int getHbmFlushSize();
	
	public String getSequenceByName(String sqlName);

	
	public int getCountsByBean(Serializable bean, MatchMode mode);

	
	public Long getOracleSequence(String seqName);
	
	public void execDllSql(String ddlSql);
	
	@SuppressWarnings("rawtypes")
	public Collection getBeansByParams(String hqlName,
			Map<String, Object> paramsMap);
	
	public void deleteByIDs(String beanName, String... ids);
	
	public Object[] getObjectsByParams(String hqlName,
			Map<String, Object> paraMap);

}
